/*
 * File:   Video.cpp
 * Author:Jon Barg, Kathrin Holzmann, Sandra Kerntke
 *
 * Created on 7. April 2010, 15:23
 */

#include "Medium.h"
#include "Video.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

//Konstruktor von Video
Video::Video(void):Medium(true){
   cout <<"Bitte Videodaten eingeben:\n\n";
    do {
    	cin.clear();
        cin.ignore( numeric_limits<streamsize>::max(), '\n' );
        cout << "Signatur: ";
	}while (!(cin >> signatur) && cin.fail());

    do {
        cin.clear();
        cin.ignore( numeric_limits<streamsize>::max(), '\n' );
        cout << "Dauer: ";
	}while (!(cin >> dauer) && cin.fail());

    cout << "Titel: ";
    cin.ignore( numeric_limits<streamsize>::max(), '\n' );
    getline(cin, titel );

	cout << "\nDas Video wurde gespeichert.\n\n";
    status = true;
}

/*
 * function print()
 * param: -
 * return: -
 * description: prints out the actual video object
 */
void Video::print(){

    cout << right << signatur << "  " << left << setw(15) << "Video";
    cout << setw(15) << titel << "  " << left << setw(15);
   
// checks state of the object
    if(status)
        cout<<"vorh.";
    else
        cout<<"entl.";

     cout << left << setprecision(5) << "Dauer:" << dauer <<"min"<<endl;

}



